package com.qqt.csr.order.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;

/**
 * 工单动态表
 * @author 
 */
@Getter
@Setter
@Accessors(chain = true)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
@TableName(value = "csr_order_dynamic")
public class OrderDynamic implements Serializable {
    @Serial
    private static final long serialVersionUID = -7746425704762816779L;
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 动态内容
     */
    @TableField(value = "content")
    private String content;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 创建人id
     */
    @TableField(value = "creator_id")
    private Long creatorId;

    /**
     * 是否移除：0 否；1 是
     */
    @TableField(value = "delete_flag")
    @TableLogic(value = "0",delval = "1")
    private Integer deleteFlag;

    /**
     * 扩展信息json
     */
    @TableField(value = "ext")
    private String ext;

    /**
     * 工单id
     */
    @TableField(value = "order_id")
    private Long orderId;

    /**
     * 父级动态id
     */
    @TableField(value = "parent_id")
    private Long parentId;

    /**
     * 动态类型：0 工单变更；1 留言/回复
     */
    @TableField(value = "`type`")
    private Integer type;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

}